class Solution(object):
    def countSegments(self, s):
        return len([word for word in s.split()])